﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MyFinanceManager.Objects
{
    [Serializable]
    public class TransferRecord : AccountRecord
    {
        public Account AccountTo { get; set; }
        public string AccountToName { get; set; }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder(base.ToString());

            sb.Append("Account to: ");
            if (this.AccountTo != null)
            {
                sb.AppendLine(this.AccountTo.ToString());
            }
            else
            {
                sb.AppendLine(this.AccountToName);
            }
            
            return sb.ToString();
        }
    }
}
